/**
  * A round is the fight between the two players, whereby each player tries to reduce his opponents health to zero within 90 seconds.
  *
  * @author "Brian MacCarthy","Owen Grogan";
  * @created "2007-03-04 Brian MacCarthy";
  * @revised "$Date: 2007-03-06 19:11:00 $"; 
  */

package exfist;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;

public class Round extends Match
{
	int time,score,winner;
	long currtime,timelapse;
	double d;
	Player p1,p2;
	public Round()
	{
		p1 = new Player();
		p2 = new Player();
		currtime=System.currentTimeMillis();
		time=90;
		this.setWinner(0);
	}
	private int getTime()
	{
		return time;
	}
	private int getScore()
	{
		return score;
	}
	private int getWinner()
	{
		return winner;
	}
	public void resetTime(){
		time=90;
	}
	public void time()
	{
		timelapse+=((System.currentTimeMillis())-currtime);
		if(timelapse>1000&&time!=0){
			time--;
			timelapse=0;
		}
		currtime=System.currentTimeMillis();
	}
	private void resetPlayerPos()
	{
		
	}
	private void setScore(int s)
	{
		score = s;
	}
	private void setWinner(int w)
	{
		winner = w;
	}
	
   public void paintStatus(Graphics2D g) {
		g.setFont(new Font("Arial",Font.BOLD,40));
		g.setPaint(Color.BLUE);
		g.drawString(Integer.toString(score),200,60);
		g.drawString(Integer.toString(time),512,60);
   }
}
